<template>
  <div class="dashboard-container">
    <div class="app-container">
      <el-card shadow="never">
        <!-- 数据 -->
          <el-table :data="dataList" border style="width: 100%">
            <el-table-column  type="index" label="序号" width="50"></el-table-column>
            <el-table-column  prop="name" label="企业名称" width="250"></el-table-column>
            <el-table-column  prop="version" label="版本" width="250"></el-table-column>
            <el-table-column  prop="companyphone" label="联系电话" width="250"></el-table-column>
            <el-table-column  prop="expirationDate" label="截至时间" width="250"></el-table-column>
            <el-table-column  prop="state" label="状态" width="150">
               <template slot-scope="scope">
                  <el-switch
                    v-model="scope.row.state"
                    inactive-value="0"
                    active-value="1"
                    disabled>
                  </el-switch>
              </template>
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="250">
              <template slot-scope="scope">
                <router-link :to="'/saas-client/detail/'+scope.row.id">查看</router-link>
              </template>
            </el-table-column>
          </el-table>
        <!-- end -->
      </el-card>
     </div>
  </div>
</template>

<script>
import {list} from '@/api/base/saas-chlient'
export default {
  name: 'saas-clients-table-index',
  data() {
    return {
        dataList: [],
    }
  },
  methods: {
      getList(){
        list().then(res => {
          this.dataList =res.data.data;
        })
      }
  },
  // 创建完毕状态
  created() {
    this.getList()
  },
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.alert {
  margin: 10px 0px 0px 0px;
}
.pagination {
  margin-top: 10px;
  text-align: right;
}
</style>
